home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2297 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: Hermes.grace.irl.cri.nz!maths!peterm
  2. From: peterm@maths.grace.cri.nz (Peter McGavin)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Demo/game to OS frien
  5. Date: 29 Jan 1996 23:51:47 GMT
  6. Organization: Industrial Research Ltd
  7. Message-ID: <PETERM.96Jan30125147@tui.maths.irl.cri.nz>
  8. References: <4dtbl0$84n@sinsen.sn.no> <4dtgil$1kn@serpens.rhein.de>
  9.     <4e382s$54t$1@sydney.DIALix.oz.au> <4e3imr$is@serpens.rhein.de>
  10.     <jdm.822861553@thetics>
  11. NNTP-Posting-Host: tui.grace.cri.nz
  12. In-reply-to: jdm@atheria.europa.com's message of 28 Jan 1996 12:58:20 -0800
  13.  
  14. jdm@atheria.europa.com (Jesse) writes:
  15. >What if you use the OS (ooo!) to shut it down and use your
  16. >own preemptive multitasking kernel (which has lower overhead and is more suited
  17. >for the task than exec), restoring the system when your program is finished?  
  18.  
  19. It is dangerous to restore the OS except by rebooting.  In particular,
  20. third-party DMA devices are likely to be screwed.  There is a risk of
  21. corrupting hard disks.  It plays havoc with networks.
  22.  
  23. Also, taking over the OS interrupt subsystem conflicts with the design
  24. goals of the multitasking executive.  Interrupt handlers and servers
  25. must be installed with SetIntVector(), AddIntServer(), QBlit(),
  26. AddICRVector(), etc (unless we reboot afterwards).  Interrupts may not
  27. be disabled for more than 250 microseconds (unless we reboot
  28. afterwards).
  29.  
  30. On the other hand, the OS allows hardware-banging.  Hardware must be
  31. exclusively allocated through the OS first.  Custom gfx chips may be
  32. exclusively allocated with LoadView(NULL); audio registers with
  33. audio.device; parallel port with misc.resource; and so on.
  34.  
  35. By installing an input handler, leaving multitasking on, adjusting
  36. priorities and allocating hardware as required, almost any OS-killing
  37. program can be made OS-compliant with practically no performance loss.
  38. This method has all the performance advantages of killing the OS and
  39. it allows network play, continuous async HD/CDROM caching, OS library
  40. calls, etc.  However it doesn't work with unknown gfx-cards,
  41. audio-cards, third-party parallel ports, new Amigas, etc, unless the
  42. program includes an option for entirely high-level OS calls.  A
  43. program can be selective about which hardware it bangs.
  44. -- 
  45. Peter McGavin.   (p.mcgavin@irl.cri.nz)
  46.